<?php

if( isset( $_GET['q'] ))
	$RSS = $_GET['q'];
else
	$RSS = "http://www.wedplan.net/rss/articles.rss";

if( isset( $_GET['Start'] ))
	$nStart = $_GET['Start'];
else
	$nStart = 0;

if( isset( $_GET['Num'] ))
	$nQurey = $_GET['Num'];
else
	$nQurey = "1";


//$url = "https://ajax.googleapis.com/ajax/services/feed/load?v=2.0&q=".$RSS."&num=".$nQurey;//."&userip=107.22.182.14";
$url = "http://www.google.com/reader/api/0/feed-finder?q=Seba";

//*
// sendRequest
// note how referer is set manually
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

//curl_setopt($ch, CURLOPT_HEADER, false);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

//curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);	

$body = curl_exec($ch);

if (curl_errno($ch))
{
	print curl_error($ch);
	echo "<br/>TEST1<br/>";
}
else
{
	echo ( $body );	
	echo "<br/>TEST2<br/>";
}
curl_close($ch);

// now, process the JSON string
$json = json_decode($body);
// now have some fun with the results...
/*
// Feed From
$urlFeed = $json->responseData->feed->feedUrl;
// Title
$strTitle = $json->responseData->feed->title;
// Web Link
$urlWeb = $json->responseData->feed->link;
// Author
$Author = $json->responseData->feed->author;
// Description
$strDescription = $json->responseData->feed->description;

var_dump( count($json->responseData->feed->entries) );
*/
var_dump( $json );


?>